﻿namespace App_1.RequestFeatures
{
    public class QueryStringParameters
    {
        private const int MaxPageSize = 100;
        public int PageNumber { get; set; } = 1;

        private int _pageSize = 10;

        ///用属性字段的方式封装单页最大条数为100
        public int PageSize
        {
            get => _pageSize;
            set => _pageSize = value > MaxPageSize ? MaxPageSize : value;
        }

        public string? OrderBy { get; set; }
        public string? Fields { get; set; }
    }
}
